package com.six.work.servicesImpl;

import com.six.work.entity.Post;
import com.six.work.mapper.PostMapper;
import com.six.work.services.PostServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PostServicesImpl implements PostServices {
    @Autowired
    private PostMapper postMapper;

    @Override
    public List<Post> findAllPost(){
        List<Post> list = postMapper.findAllPost();
        return list;
    }

    @Override
    public List<Post> findPostByAppId(Integer applicant_id){
        List<Post> list=postMapper.findPostByAppId(applicant_id);
        return list;
    }

    @Override
    public List<Post> findPostItem(Integer resume_post_id){
        List<Post> list = postMapper.findPostItem(resume_post_id);
        return list;
    }

    //今日新增
    @Override
    public Integer FindTodayCom() {
        return postMapper.FindTodayCom();
    }

    @Override
    public Integer FindMonthCom() {
        return postMapper.FindMonthCom();
    }



    //插入数据到post表 求职者对公司投递简历
    @Override
    public Integer insertPost(Post post) {
        return postMapper.insertPost(post);
    }


    //企业查看简历以后，修改状态为已查看
    @Override
    public String updatePostState(Integer resume_post_id) {
        return postMapper.updatePostState(resume_post_id);
    }

    //Pass
    @Override
    public String Reject(Integer resume_post_id) {
        return postMapper.Reject(resume_post_id);
    }

    //接受
    @Override
    public String Received(Integer resume_post_id) {
        return postMapper.Received(resume_post_id);
    }

    //后台简历
    @Override
    public List<Post> findResume(){
        List<Post> list = postMapper.findResume();
        return list;
    }
}
